#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    programTextTransfer = new ProgramTextTransfer(0);
    programSet = new ProgramSet;
    cmdList_Out.clear();
    pointList_out.clear();
    regPlList_out.clear();
    palletStackInfo_out.clear();
    QMap<int, DPoint> vehicleDPointListOut;
    QString filePath = "/agvwork/AgvFundation/fundation/data/robotData1/program/musicTest.txt";
    int resultKey = programTextTransfer->transferText(filePath,cmdList_Out,pointList_out, regPlList_out,palletStackInfo_out,
                                                      vehicleDPointListOut);
    qDebug() << "programTextTransfer->transferText ==== resultKey:" << resultKey;
    programSet->transferTextInstructionToStructData(cmdList_Out,0,"MoveFreeInstruction",0,0);
//    fileData->readProgramQuick(filePath);
//    fileData->readProgram(filePath);
//    programEngine->readOneProgramFile(filePath);

}

MainWindow::~MainWindow()
{
    delete ui;
}
